package main

import (
	"fmt"
)

// Sleep接口
type Sleep interface {
	sleelp()
}

// Runner接口
type Runnler interface {
	run()
}

// Animal接口
type Alnimal interface {
	Sleep
	Runnler
}

type Dolg struct {
	name string
}

// Dog实现了run方法和sleep方法，即实现了Animal接口
func (d Dolg) run() {
	fmt.Printf("%s正在吐舌头跑\n", d.name)
}
func (d Dolg) sleelp() {
	fmt.Printf("%s正在侧翻睡\n", d.name)
}

func main() {
	var r Alnimal
	var d = Dolg{name: "旺财"}
	r = d
	r.run()
	r.sleelp()
}
